#ifndef   M_Code_TREECTRL_H
#define   M_Code_TREECTRL_H

#include <wx/treectrl.h>

class ProjectFile;
class wxKeyEvent;
class wxMouseEvent;
class wxTreeItemId;
class wxWindow;

class M_Code_TreeCtrl : public wxTreeCtrl {
  public:
    M_Code_TreeCtrl();
    M_Code_TreeCtrl( wxWindow* parent, int id );
    void SetCompareFunction( const int ptvs );
    virtual wxTreeItemId GetPrevVisible( const wxTreeItemId& item ) const;
  protected:
    void OnRightClick( wxMouseEvent& event );
    void OnKeyDown( wxKeyEvent& event );
    static int filesSort( const ProjectFile* arg1, const ProjectFile* arg2 );
    static int filesSortNameOnly( const ProjectFile* arg1, const ProjectFile* arg2 );
    int OnCompareItems( const wxTreeItemId& item1, const wxTreeItemId& item2 );
    int ( *Compare )( const ProjectFile* arg1, const ProjectFile* arg2 );
    DECLARE_DYNAMIC_CLASS( M_Code_TreeCtrl )
    DECLARE_EVENT_TABLE()
};

#endif
